package com.team.activity.mapper;

import com.team.activity.domain.BizActivityLog;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author 王双印
* @description 针对表【biz_activity_log】的数据库操作Mapper
* @createDate 2025-07-14 20:18:10
* @Entity com.team.activity.domain.BizActivityLog
*/
public interface BizActivityLogMapper {

    int deleteByPrimaryKey(Long id);

    int insert(BizActivityLog record);

    int insertSelective(BizActivityLog record);

    BizActivityLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BizActivityLog record);

    int updateByPrimaryKey(BizActivityLog record);


    @Update("UPDATE biz_activity_log SET count = count + 1 WHERE activity_id = #{activityId} AND user_id = #{userId}")
    void update(Long activityId, Long userId);

    @Select("SELECT * FROM biz_activity_log WHERE activity_id = #{activityId} AND user_id = #{userId}")
    BizActivityLog selectByActivityIdAndUserId(Long activityId, Long userId);
}
